import React, { Component } from 'react';
import { PieChart } from '_platform/components4max/Charts/Pie';

export default class NPC extends Component {
    render() {
        return (
            <PieChart style={{ width: '100%', height: '100%' }} option={ {
                tooltip : {
                    trigger: 'item',
                    formatter: "{a} <br/>{b} : {c} ({d}%)"
                },
                legend: {
                    orient: 'vertical',
                    left: 'left',
                    data: ['1','2','3','4','5'],
                    textStyle :{
                        color:'#fff'
                    }
                },
                series : [
                    {
                        name: '访问来源',
                        type: 'pie',
                        radius : '55%',
                        center: ['50%', '60%'],
                        data:[
                            {value:335, name:'1'},
                            {value:310, name:'2'},
                            {value:234, name:'3'},
                            {value:135, name:'4'},
                            {value:1548, name:'5'}
                        ],
                        itemStyle: {
                            emphasis: {
                                shadowBlur: 10,
                                shadowOffsetX: 0,
                                shadowColor: 'rgba(0, 0, 0, 0.5)'
                            }
                        }
                    }
                ]
            }
            } />
        )
    }
}